﻿using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
using System.Runtime.CompilerServices;


namespace android_charge
{
    public partial class Amazon_UK_NEW : Amazon
    {
        public Amazon_UK_NEW(string devices_id)
        {

            this.devices_id = devices_id;
            content1.setItems(new Object[] { "谷歌账号", "谷歌密码", "辅助邮箱", "卡号", "过期时间", "卡密码", "街道", "城市", "邮编", "亚马逊账号", "亚马逊密码", "谷歌密码" });
            InitializeComponent();
            region = "GB";
            this.HandleCreated += new EventHandler(OnHandleCreated);
            Task.Run(() =>
            {
                init();
            });
            labelMap = new string[]
            {
                "gAccount",
                "gPassword",
                "fuEmail",
                "number",
                "exDate",
                "pwd",
                "sta",
                "pt",
                "pc",
                "amzonAcc",
                "amPwd",
                "gPassword"
            };
        }



        public override void init()
        {
            // 查看是否存在curl            
            send_curl();
            // 静止熄屏
            // 禁止弹出键盘
            batch_adb("settings put system screen_off_timeout 2147483647", "ime disable com.android.inputmethod.latin/.LatinIME");
            if (string.IsNullOrEmpty(server))
            {
                server = Main.vpn;
            }
        }



        private void label3_Click(object sender, EventArgs e)
        {
            if (sender is Label)
            {
                Label label = (Label)sender;
                Clipboard.SetText(label.Text);
            }
        }



        private void button11_Click(object sender, EventArgs e)
        {
            Task.Run(() =>
            {
                active(() => { content1.amzonAccount(null, null); });
            });
        }

        private void Amzon_UK_NEW_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            Task.Run(() =>
            {
                batch_adb_input(
                    content1.getByName("number"), content1.getByName("exDate"), content1.getByName("pwd"), 1, content1.getByName("sta"), 2, content1.getByName("pt"),
                    1, content1.getByName("pc")
                );
            });
        }

    
    }
}
